const fse = require("fs-extra");
const path = require("path");

const topDir = __dirname;

// tinymce
fse.emptyDirSync(path.join(topDir, "public", "tinymce"));
fse.copySync(
  path.join(topDir, "node_modules", "tinymce"),
  path.join(topDir, "public", "tinymce"),
  { overwrite: true },
);

// tinymce语言包
fse.emptyDirSync(path.join(topDir, "public/tinymce", "langs"));
fse.copySync(
  path.join(topDir, "src/components/TextEditor", "langs"),
  path.join(topDir, "public/tinymce", "langs"),
  { overwrite: true },
);
